package utils

import (
    "io/ioutil"
    "log"
    "net/http"
)

func DoGet(url string) []byte {
    res, err := http.Get(url)
    if err != nil {
        log.Fatal(err)
    }
    jsstr, err := ioutil.ReadAll(res.Body)
    res.Body.Close()
    if err != nil {
        log.Fatal(err)
    }
    return jsstr
}
